//
//  RootView.m
//  UI3_UIImageView
//
//  Created by dllo on 15/11/10.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "RootView.h"

@implementation RootView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.backgroundColor = [UIColor whiteColor];
    //     UIImage - 专门用来管理图片的类, 本身不具备显示功能
    //     UIImageView -  专门用来显示图片的视图
//        UIImage *image = [UIImage imageNamed:@"image2.jpg"];
//        UIImageView *imageV = [[UIImageView alloc] initWithImage:image];
//        imageV.frame = self.frame;
//        [self addSubview:imageV];
//        [imageV release];
    
        UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(30, 30, 300, 500)];
        imageV.image = [UIImage imageNamed:@"image15.jpg"];
        [self addSubview:imageV];
        [imageV release];

}





@end
